const ages=[32,33,16,39];
const newAge=ages.map(function(age){
    if(age >= 18){
        return age;
    }
})
console.log(newAge);